package course6;

public class SiSheWuRu {
    public static void main(String[] arge){
        double a=20.16;
        int b=(int)a;
        System.out.println("b的值:"+b);
        System.out.println("a的值:"+a);
        double c=0l;
        c=a-b;
        if (c>=0.5) {
        b = b + 1;
        System.out.println("a的四舍五入后b的值为:" +b);
    }else {
            System.out.println("a四舍五入后b的值为:"+b);
        }
    }
}
